package com.xiaomaoguai.cxf.demo1;

import javax.xml.ws.Endpoint;

/**
 * @Description :
 * @FileName: MainTest.java
 * @Author :WeiHui.Zhang
 * @Data : 2015年8月13日 上午10:51:13
 * @Version:V1.00
 */
public class Server {

	protected Server() throws Exception {
		// START SNIPPET: publish
		System.out.println("Starting Server");
		HelloWorldImpl implementor = new HelloWorldImpl();
		String address = "http://localhost:9000/helloWorld";
		Endpoint.publish(address, implementor);
		// END SNIPPET: publish
	}

	public static void main(String[] args) throws Exception {
		new Server();
		System.out.println("Server ready...");

		Thread.sleep(5 * 60 * 1000);
		System.out.println("Server exiting");
		System.exit(0);
	}
}
